home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / Apple Guide / Authoring / Example Source Files / Video Player Guide AdditionsSrc / VideoPlayerQualifier Source / VideoPlayerQualifier.a < prev   
Encoding:
Text File  |  1994-07-06  |  1.1 KB  |  47 lines  |  [TEXT/MPS ]

  1.                     include     'GestaltEqu.a'
  2.                     include     'Traps.a'
  3.                     
  4.                     CASE    OBJ
  5.  
  6. gestaltTV            EQU        'mtv2'
  7.  
  8. gestaltTellShow                EQU        98            
  9. gestaltTellXfmr                EQU        99
  10.  
  11. ;    We use the gestaltTV selector as an indicator of whether the Video Player App is present.
  12. ;    if the gestaltTV selector has been implemented then we should allow the VideoPlayer Addition to be mixed in.
  13.  
  14. QLfyEntry    PROC    EXPORT
  15.             movem.l    a0/d1,-(sp)
  16.             
  17.             move.l    #gestaltMachineType,d0            ; assume Video is supported on all AVs
  18.             _Gestalt
  19.             move.w    d0,d1                            ; 
  20.             bne.s    @fail                            ; 
  21.  
  22.             cmp.w    #gestaltTellShow, a0
  23.             beq.s    @checkTV
  24.             
  25.             cmp.w    #gestaltTellXfmr, a0
  26.             beq.s    @checkTV
  27.             
  28.             bra.s    @fail
  29.  
  30. @checkTV
  31.             move.l    #gestaltTV,d0                    ; check to see if the gestaltTV selector is implemented
  32.             _Gestalt
  33.             move.w    d0,d1                            ; if no error is returned then the selector has been implemented correctly, 
  34.             beq.s    @pass                            ; therefor the VidePlayerAddition should be mixed in.
  35.                                                     
  36. @fail                                        
  37.             move.w    #0,d0                            ; return false
  38.             bra.s    @exit
  39. @pass
  40.             move.w    #1,d0                            ; return true
  41. @exit
  42.             movem.l    (sp)+, a0/d1
  43.             rts
  44.             
  45.             ENDPROC
  46.             
  47.             END